package com.sikaryofficial.backend.domain.dto.resp;

import com.sikaryofficial.backend.constant.ReportBusinessTypeEnum;
import com.sikaryofficial.backend.constant.ReportTypeEnum;
import com.sikaryofficial.backend.domain.dto.ReportLogDTO;
import com.sikaryofficial.common.core.annotation.LocalDateTimeFormat;
import com.sikaryofficial.system.api.model.AddressDTO;
import com.sikaryofficial.system.api.model.att.AttachmentResp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 举报响应入参
 *
 * @author qinjinyuan
 * @date 2023-11-08
 */
@Getter
@Setter
@ToString
@ApiModel(value = "举报响应出参", description = "举报响应出参")
public class ReportDTO {

    /**
     * 举报ID
     */
    @ApiModelProperty(value = "举报ID")
    private Long reportId;

    /**
     * 举报关联对象ID
     */
    @ApiModelProperty(value = "举报关联对象ID")
    private Long relationId;

    /**
     * 举报类型：1-淫秽色情,2-营销广告,3-网络暴力,4-违法信息,5-虚假谣言,6-诈骗内容,7-恐怖主义内容,8-侵犯版权内容,9-仇恨言论,10-骚扰、欺凌和威胁,11-违法内容,12-涉及儿童安全,13-其他不良内容
     */
    @ApiModelProperty(value = "举报类型：1-淫秽色情,2-营销广告,3-网络暴力,4-违法信息,5-虚假谣言,6-诈骗内容,7-恐怖主义内容,8-侵犯版权内容,9-仇恨言论,10-骚扰、欺凌和威胁,11-违法内容,12-涉及儿童安全,13-其他不良内容")
    private Integer reportType;
    /**
     * 业务类型：1-店铺,2-评论,3-评论回复
     */
    @ApiModelProperty(value = "业务类型：1-店铺,2-评论,3-评论回复")
    private Integer businessType;

    /**
     * 举报状态：1-accepting受理中,2-accepted已受理
     */
    @ApiModelProperty(value = "举报状态：1-accepting受理中,2-accepted已受理")
    private Integer reportStatus;

    /**
     * 举报编号
     */
    @ApiModelProperty(value = "举报编号")
    private String reportNum;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "举报时间")
    @LocalDateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 创建人名称
     */
    @ApiModelProperty(value = "创建人名称")
    private String createdName;
    @ApiModelProperty(value = "举报处理日志")
    private List<ReportLogDTO> reportLogList;

    /**
     * 店铺ID
     */
    @ApiModelProperty(value = "店铺ID",  example = "222222222233333")
    private Long storeId;
    /**
     * 店铺名称
     */
    @ApiModelProperty(value = "店铺名称",  example = "12.2435")
    private String storeName;

    /**
     * 店铺与当前位置距离
     */
    @ApiModelProperty(value = "店铺与当前位置距离",  example = "12.2435")
    private BigDecimal distance;

    /**
     * 店铺地址
     */
    @ApiModelProperty(value = "店铺地址",  example = "12.2435")
    private String shopAddress;

    /**
     * 店铺图片地址
     */
    @ApiModelProperty(value = "店铺图片地址",  example = "12.2435")
    private String imageUrl;

    /**
     * 品牌口味ID
     */
    @ApiModelProperty(value = "产品ID", example = "1212435")
    private Long brandTasteId;

    /**
     * 评价ID
     */
    @ApiModelProperty(value = "评价ID", example = "1212435")
    private Long evaluateId;

    /** 评价回复ID */
    @ApiModelProperty(value = "评价回复ID",  example = "12.2435")
    private Long evaluateReplyId;

    @ApiModelProperty(value = "举报类型描述")
    public String getReportTypeDesc() {
        if (Objects.isNull(this.reportType)) {
            return null;
        }
        ReportTypeEnum reportTypeEnum = ReportTypeEnum.getEnum(this.reportType);
        if (Objects.isNull(reportTypeEnum)) {
            return null;
        }
        return reportTypeEnum.getDescription();
    }

    @ApiModelProperty(value = "业务类型描述")
    public String getBusinessTypeDesc() {
        if (Objects.isNull(this.businessType)) {
            return null;
        }
        ReportBusinessTypeEnum reportBusinessTypeEnum = ReportBusinessTypeEnum.getEnum(this.businessType);
        if (Objects.isNull(reportBusinessTypeEnum)) {
            return null;
        }
        return reportBusinessTypeEnum.getDescription();
    }

    /**
     * 店铺图片
     */
    @ApiModelProperty(value = "店铺图片列表")
    private List<AttachmentResp> productImage;

    /**
     * 店铺图片
     */
    @ApiModelProperty(value = "店铺图片列表")
    private List<AttachmentResp> storeImage;

    /**
     * 店铺地址ID
     */
    @ApiModelProperty(value = "店铺地址ID")
    private Long addressId;

    /**
     * 地址对象
     */
    @ApiModelProperty(value = "地址对象")
    private AddressDTO address;

    /**
     * 地址详情
     */
    @ApiModelProperty(value = "地址详情")
    private String addressDetail;

    /**
     * 名
     */
    @ApiModelProperty(value = "名")
    private String firstName;

    /**
     * 姓
     */
    @ApiModelProperty(value = "姓")
    private String lastName;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 电话号码
     */
    @ApiModelProperty(value = "电话号码")
    private String phoneNumber;

    @ApiModelProperty(value = "城市")
    private String city;

    @ApiModelProperty(value = "国家")
    private String country;
    /**
     * 区域
     */
    @ApiModelProperty(value = "区域")
    private String area;

    /**
     * 区县
     */
    @ApiModelProperty(value = "区县")
    private String county;
}
